projects
/
project
/
bcm63xx
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b4d956f
)
net: Handle an empty bootp extension section
author
Andre Renaud
<
[email protected]
>
Thu, 5 May 2016 13:28:08 +0000
(07:28 -0600)
committer
Andreas Bießmann
<
[email protected]
>
Sun, 12 Jun 2016 21:49:38 +0000
(23:49 +0200)
Avoid generating this section if there is nothing in it.
Signed-off-by: Andre Renaud <
[email protected]
>
Signed-off-by: Simon Glass <
[email protected]
>
Acked-by: Joe Hershberger <
[email protected]
>
net/bootp.c
patch
|
blob
|
history
diff --git
a/net/bootp.c
b/net/bootp.c
index aa6cdf0a47a5c17a36a711c62e72043890ce2465..42e14eda417436b0b6ef133055185e2ecb895029 100644
(file)
--- a/
net/bootp.c
+++ b/
net/bootp.c
@@
-673,6
+673,15
@@
static int bootp_extended(u8 *e)
*e++ = 255; /* End of the list */
+ /*
+ * If nothing in list, remove it altogether. Some DHCP servers get
+ * upset by this minor faux pas and do not respond at all.
+ */
+ if (e == start + 3) {
+ printf("*** Warning: no DHCP options requested\n");
+ e -= 3;
+ }
+
return e - start;
}
#endif